Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Updated ThreadMessage struct with latest fields based on OpenAI docs #792

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

ecoralic
Copy link
Contributor

Describe the change
ThreadMessage has deprecated fields, and new fields are missing, so requests with files cannot be made.

Provide OpenAI documentation link
https://platform.openai.com/docs/api-reference/threads/createThread

Describe your solution
Updated ThreadMessage based on OpenAI docs.

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.88%. Comparing base (774fc9d) to head (460bd13).
Report is 27 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #792      +/-   ##
==========================================
+ Coverage   98.46%   98.88%   +0.42%     
==========================================
  Files          24       26       +2     
  Lines        1364     1343      -21     
==========================================
- Hits         1343     1328      -15     
+ Misses         15        9       -6     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MontiMarco92
Copy link

Hi @ecoralic. Thanks for this. I think that FileIDs should still remain for backwards compatibility with V1, what do you think? Besides, now Content can be a string or an array of objects. Check this related issue

Copy link
Owner

@sashabaranov sashabaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sashabaranov sashabaranov merged commit ae903d7 into sashabaranov:master Jul 19, 2024
3 checks passed
@ecoralic ecoralic deleted the fix/thread_message_struct branch July 19, 2024 14:39
@beastmaximus
Copy link

What about MessageRequest struct? Should it also contain Attachments field just like ThreadMessage does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants